package com.hw.esay.myExam;

import java.util.Scanner;

//质数因子
//对于给定的整数n ，从小到大依次输出它的全部质因子。即找到这样的质数n=p1*p2*p3..*pk
public class HJ6 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long num = scan.nextLong();
        long k = (long) Math.sqrt(num);

        for (long i = 2; i <= k; ++i) {
            while (num % i == 0) {
                System.out.print(i + " ");
                num /= i;
            }
        }
        System.out.println();

    }
}
